const state = {
	show: false,
	title: '温馨提示',
	content: '',
	showCancelButton: true,
	confirmText: "确定",
	cancelText: "取消",
	success: null
}
const mutations = {
	hideModal(state) {
		state.show = false;
	},
	showModal(state, data) {
		state = Object.assign(state, data);
		console.log(data);
	},
	success(state, res) {
		let func = state.success
		let statusObj = {
			cancel: false,
			confirm: false,
		}
		res === 'confirm' ? statusObj.confirm = true : statusObj.cancel = true;
		func && func(statusObj);
	}
}

export default {
	namespaced: true,
	state,
	mutations
}